

export const accessof = 'accessof'
export const addressof = 'addressof'
export const offsetof = 'offsetof'
export const memcpy = 'memcpy'
export const sizeof = 'sizeof'
export const move = 'move'
export const staticCast = 'static_cast'
export const assert = 'assert'
export const indexOf = 'indexOf'
export const reinterpretCast = 'reinterpret_cast'
export const sharedPtr = 'SharedPtr'

export const structAccess = 'structAccess'
export const writePointer = 'writePointer'
export const ctypeEnumWrite = 'CTypeEnumWrite'
export const ctypeEnumRead = 'CTypeEnumRead'
export const definedMetaProperty = 'definedMetaProperty'

export const symbolStructAddress = 'symbolStructAddress'
export const symbolStruct = 'symbolStruct'
export const symbolStructMaxBaseTypeByteLength = 'symbolStructMaxBaseTypeByteLength'
export const symbolStructLength = 'symbolStructLength'
export const symbolStructKeysMeta = 'symbolStructKeysMeta'

export const createThreadFromClass = 'createThreadFromClass'
export const createThreadFromFunction = 'createThreadFromFunction'
export const createThreadFromModule = 'createThreadFromModule'

export const typeArray = 'array'
export const typeBit = 'bit'
export const typePointer = 'pointer'
export const typeSize = 'size'
export const typeAnyptr = 'anyptr'
export const typeNullptr = 'nullptr'
export const typeMultiPointer = 'multiPointer'
export const typeUnion = 'union'
export const typeStruct = 'struct'
export const defined = 'defined'
export const args = 'args'
export const enableArgs = 'enableArgs'

export const enumPointer = 'typeptr'

export const tagAsm = 'asm'
export const tagAsm64 = 'asm64'

export const prototype = 'prototype'

export const cstruct = 'struct'
export const cunion = 'union'
export const ctype = 'type'
export const cpointer = 'pointer'
export const carray = 'array'
export const cbitField = 'bit'
export const cignore = 'ignore'
export const cinline = 'inline'
export const cdeasync = 'deasync'

export const make = 'make'
export const unmake = 'unmake'
export const malloc = 'malloc'
export const calloc = 'calloc'
export const realloc = 'realloc'
export const alignedAlloc = 'aligned_alloc'
export const free = 'free'
export const Allocator = 'Allocator'
export const makeSharedPtr = 'make_shared_ptr'

export const makeSharedPtrImportName = 'makeSharedPtr'
export const smartPointerProperty = ['get', 'reset', 'unique', 'useCount', 'has', 'transferable', 'clone']

export const typeProperty = 'zzztype__'
export const levelProperty = 'zzzlevel__'
export const structProperty = 'zzzstruct__'

export const LINE = '___LINE__'
export const LINE_2 = '__LINE__'
export const FILE = '___FILE__'
export const FILE_2 = '__FILE__'
export const MODULE = '___MODULE__'
export const MODULE_2 = '__MODULE__'

export const importStar = '__importStar'
export const importDefault = '__importDefault'
export const symbolIsPointer = Symbol('symbolIsPointer')

export let PACKET_NAME = ''

export let AllocatorPath = ''
export let makePath = ''
export let unmakePath = ''
export let makeSharedPtrPath = ''
export let atomicsPath = ''
export let sizeofPath = ''
export let definedMetaPropertyPath = ''
export let memoryPath = ''
export let symbolPath = ''
export let structAccessPath = ''
export let ctypeEnumReadPath = ''
export let ctypeEnumWritePath = ''
export let cheapThreadPath = ''

export function setPacketName(name: string) {
  PACKET_NAME = name
  AllocatorPath = PACKET_NAME + '/heap'
  makePath = PACKET_NAME + '/std/make'
  unmakePath = PACKET_NAME + '/std/unmake'
  makeSharedPtrPath = PACKET_NAME + '/std/smartPtr/SharedPtr'
  atomicsPath = PACKET_NAME + '/thread/atomics'
  sizeofPath = PACKET_NAME + '/std/sizeof'
  definedMetaPropertyPath = PACKET_NAME + '/function/definedMetaProperty'
  memoryPath = PACKET_NAME + '/std/memory'
  symbolPath = PACKET_NAME + '/symbol'
  structAccessPath = PACKET_NAME + '/std/structAccess'
  ctypeEnumReadPath = PACKET_NAME + '/ctypeEnumRead'
  ctypeEnumWritePath = PACKET_NAME + '/ctypeEnumWrite'
  cheapThreadPath = PACKET_NAME + '/thread/thread'
}
